﻿<Application x:Class="CnmViewer.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:CnmViewer"
    StartupUri="Window1.xaml">
    <Application.Resources>
        <local:TimeConverter x:Key="TimeConverter"></local:TimeConverter>

        <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
            <Setter Property="Padding" Value="0"></Setter>
            <Setter Property="FontFamily" Value="Verdana, Tahoma"></Setter>
            <Style.Triggers>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="IsSelected" Value="True"></Condition>
                        <Condition Property="IsFocused" Value="True"></Condition>
                    </MultiTrigger.Conditions>
                    <Setter Property="Background" Value="{x:Static SystemColors.HighlightBrush}"></Setter>
                </MultiTrigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="ListBoxItem.IsSelected" Value="True"></Condition>
                        <Condition Property="ListBoxItem.IsFocused" Value="False"></Condition>
                    </MultiTrigger.Conditions>
                    <Setter Property="ListBoxItem.Background" Value="{x:Static SystemColors.InactiveCaptionBrush}"></Setter>
                </MultiTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="BorderStyle" TargetType="Border">
            <Setter Property="Margin" Value="3"></Setter>
            <Setter Property="BorderThickness" Value="2"></Setter>
            <Setter Property="BorderBrush" Value="SteelBlue"></Setter>
            <Setter Property="CornerRadius" Value="4"></Setter>
        </Style>
        
        <Style x:Key="BorderBigStyle" TargetType="Border" BasedOn="{StaticResource BorderStyle}">
            <Setter Property="Padding" Value="3"></Setter>
        </Style>
        
        <Style x:Key="ButtonWideStyle" TargetType="Button">
            <Setter Property="Padding" Value="15,3,15,3"></Setter>
            <Setter Property="Margin" Value="3"></Setter>
        </Style>

        <Style x:Key="TextBoxReadonlyStyle" TargetType="TextBox">
            <Setter Property="TextWrapping" Value="Wrap"></Setter>
            <Setter Property="IsReadOnly" Value="True"></Setter>
            <Setter Property="Background" Value="Transparent"></Setter>
            <Setter Property="BorderBrush" Value="Transparent"></Setter>
        </Style>

        <Style x:Key="TextBoxReadonlyBigStyle" TargetType="TextBox" BasedOn="{StaticResource TextBoxReadonlyStyle}">
            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"></Setter>
            <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"></Setter>
        </Style>

    </Application.Resources>
</Application>
